home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST4.ADF / du4.3 / DirUtil.doc < prev    next >
Text File  |  1987-07-22  |  19KB  |  409 lines

  1. Summary of new features in 4.3:
  2.   --fixed small bugs in Type and Hextype
  3.   --renamed "Delete Files" as "Zap Files" for safety (it's placed in an
  4.     out-of-the-way corner)
  5.   --If no file is clicked, Edit tries to edit whatever is in the R gadget;
  6.     if that's blank, it runs anyway.
  7.   --If no file is clicked, Run tries to run whatever is in the R gadget.
  8.     Run can be "cycled"--it either runs the clicked file and passes R as
  9.     an argument (the old way), or it runs the R gadget and passes the
  10.     clicked file as an argument.
  11.     Run is now much more flexible and useful!
  12.   --I deleted 6 lines of C source relating to argc/argv and the final
  13.     program size dropped by 2000 bytes!!  Scary stuff, kids!
  14.  
  15. DirUtil 4.3 and these instructions are by
  16.     Charles Tyson -- C-M-T on PeopleLink;
  17.                      C.TYSON on GEnie;
  18.                      Charles Tyson on FAUG BBS (415-595-2479)
  19.  
  20. ----------------------------------------------------------------------------
  21.  
  22.                            DIRUTIL version 4.3
  23.                     Original Version by Chris Nicotra
  24.                Revisions/Enhancements/Fixes by Dave Jobusch,
  25.                Rich Medved, Nathan Barber and Charles Tyson 
  26.  
  27. Words of wisdom from a hacker of old:
  28.        "This program is in the public domain. That means you can't
  29.         sell the damn thing to anyone, and furthermore, I doubt
  30.         you'd get much for it."
  31.  
  32. Overview:
  33.   
  34.   DirUtil helps you maintain and manipulate the files on your disks (and in
  35.   RAM) without having to remember the syntax of all the CLI commands.  It
  36.   allows you to conveniently copy, delete and move groups of files with a
  37.   single operation.  Remember those wonderful "kitchen magician" appliances
  38.   that did everything--sliced, diced and figured your taxes?  Well, DirUtil
  39.   is one of those.
  40.  
  41.   DirUtil is designed to be run mostly with mouseclicks, and the display is
  42.   laid out for convenient mousing around.  The display consists of two
  43.   windows and several gadgets.  On the left is the File Window.  Here you
  44.   will see the names of all files and subdirectories in the current
  45.   directory, listed alphabetically.  If there are more files than can fit
  46.   in the window, use the long scrollbar (in the center of the screen, just
  47.   right of the file window) to see the remaining files.
  48.  
  49.   On the right is the Command Area.  Here you see what DirUtil can do with
  50.   your files.  At the top are six rectangular gadgets naming the common
  51.   devices (file storage areas) such as DF0:, DH0: and RAM:.  Below that is
  52.   a window with two columns of commands, listed alphabetically.  If there are
  53.   more than 22 commands in your version, the short scrollbar (just to the
  54.   left of the command window) will let you see the others.
  55.  
  56.   Below the command window are three string gadgets labelled R, S and D.
  57.   These are used to display certain information to you, such as the identity
  58.   of the directory that DirUtil is working on.  You will also be using these
  59.   gadgets to give DirUtil more information about your commands.  There is a
  60.   fourth string gadget at the bottom of the display (where it says "O.K.").
  61.   It is used by DirUtil to send error messages.
  62.  
  63. Instructions:
  64.   
  65.   You can start DirUtil from CLI (type "run dirutil") or by clicking on its
  66.   icon.
  67.  
  68.   In the basic DirUtil operation, you select one or more files in the File
  69.   Window by clicking on them with the left mouse button.  Then you click on
  70.   the appropriate command in the Command Window.  DirUtil carries out the
  71.   command and waits for another.
  72.  
  73.   When DirUtil begins, it is looking at the files in RAM:.  If you have no
  74.   files there, the File Window will be blank.  There are two ways to bring
  75.   files into the File Window.  First, you can click on one of the gadgets
  76.   above the Command Window.  When you click on "DF0:" for example,
  77.   DirUtil reads the directory of the disk in Drive 0 and displays it in the
  78.   File Window.  Click on another device and its files will replace those of
  79.   Drive 0.  Note that file names are displayed in white--directories are in
  80.   yellow.  The files contained within directories are not displayed (we'll
  81.   get to that in a moment).
  82.  
  83.   When you click on a gadget, the gadget's name appears in the string gadget
  84.   marked S.  This is the "current directory" for DirUtil--it tells you where
  85.   the files in the File Window are located.  The second way you can get
  86.   files to appear in the File Window is by typing an AmigaDOS directory name
  87.   into the S gadget, then pressing RETURN.  Typing "df1:" into S is the same
  88.   as clicking on the DF1: gadget.
  89.  
  90.   Suppose you see a directory called "Utilities" on the display for DF0:,
  91.   and you want to know what files and subdirectories it contains.  The easy
  92.   way is to doubleclick on the "Utilities" line in the File Window.  The
  93.   S gadget changes to "df0:Utilities" and the files within Utilities are
  94.   shown in the File Window, ready for DirUtil to work on.  The same result
  95.   can be achieved by typing the full pathname into S (click within the S
  96.   gadge  to get a cursor; position the cursor after "df0:" and type
  97.   "utilities"; press RETURN).  
  98.  
  99.   When you click on a file or directory, it is "selected," and its name is
  100.   printed in inverse color.  Click on it again, and it de-selects:  its
  101.   colors return to normal.  You can select many files at once, but no more
  102.   than one directory at a time.  (You can also select a combination of
  103.   several files and one directory).  Note that a file may be selected even
  104.   though its name has scrolled out of the File Window.  After DirUtil
  105.   executes a command, all files and directories are deselected.
  106.  
  107.   With that, you should have enough knowledge to start using DirUtil.  What
  108.   follows is a list of all commands.  Note that some commands work only on
  109.   files; some work only on directories; some work on both.  A few commands
  110.   require you to enter information in the D or R gadgets.
  111.  
  112.   Several of the commands in DirUtil II 4.2 depend on external programs, and
  113.   won't work if you don't have those programs in your C: directory.  The
  114.   commands are Edit, Show and Unarc.  Suitable programs for all three
  115.   commands are in the public domain.
  116.  
  117. DF0:
  118. DF1:
  119. DF2:
  120. DH0:
  121. RAM:
  122. VD0:
  123.  
  124.   Clicking on these gadgets means "set the current directory (S) to the root
  125.   directory of this device."  The root directory is the uppermost level of
  126.   files.  These commands do not require you to make any selection from the
  127.   File Window, of course.
  128.  
  129.   You may not own all the devices listed.  If you click on one you don't
  130.   have, you'll get a harmless system requester.  Click on the requester's
  131.   "Cancel" box to make it go away.
  132.   
  133.   When DirUtil begins, its current directory is always RAM:.
  134.  
  135.   If you have a device for which no gadget exists, you can only access it by
  136.   typing its name into the S gadget.
  137.  
  138. Clear all
  139.  
  140.   This is a fast way of deselecting all selected (highlighted) files.
  141.   It is the complement to "Select all" (described below).
  142.  
  143. Copy files to D
  144.  
  145.   This works on files only.  It copies file(s) into the directory specified
  146.   in the D gadget.  Before clicking on the command, you must click
  147.   on the D gadget and enter an existing directory name different from the
  148.   directory listed in S.  If no device name is included, the destination
  149.   directory is assumed to be on the same device as the current directory.
  150.   Do not put a slash at the end of the pathname given in D.
  151.  
  152.   Don't confuse this with the DOS copy command, where you can specify the
  153.   new name of the copied file.  DirUtil's copies have the same name as the
  154.   originals, and must end up in a different directory.
  155.   
  156. Cycle file<->R
  157.   When you click on this command, notice that the "Run" command changes
  158.   from "Run file + R" to "Run R + file" and back.  For an explanation of
  159.   what this means, see the Run command below.
  160.  
  161. Delete dir
  162.  
  163.   This command will delete ONE highlighted directory.  The directory must
  164.   be empty, i.e. contain no files.  It won't work if the selected directory
  165.   happens to be the AmigaDOS current directory.
  166.   
  167. Delete files
  168.  
  169.   This command, present in earlier versions of DirUtil, has been renamed
  170.   "Zap files."  That places it in the corner of the command window where it
  171.   is less likely to be hit by accident.  See Zap Files below.
  172.  
  173. Edit a file
  174.  
  175.   Again, for files only.  It supposes you have a file editor program named
  176.   "E" in your C: directory.  If that program exists, it will be loaded into
  177.   memory and will be commanded to edit the first selected file.  As soon as
  178.   the editor starts up, DirUtil is free to do other tasks.
  179.  
  180.   You can, in theory, use any editor program as long as you rename it "E"
  181.   and put it in the C: directory.  But if the editor doesn't create its own
  182.   editing window (e.g. the Amiga ED program), it may not be able to work with
  183.   DirUtil.
  184.  
  185.   The command RUN in the C: directory must be present when this command is
  186.   chosen.
  187.  
  188.   In version 4.3:  if no filename is highlighted but there is something in
  189.   the R gadget, DirUtil interprets R as a filename and tries to edit it.
  190.   If there is nothing in R, the Editor comes up without attempting to load
  191.   any file.  (Some editors may complain in this case--Commodore's Edit,
  192.   which probably doesn't work with DirUtil anyway, must be called with a
  193.   filename or it aborts with an error).
  194.  
  195. Hex type files
  196.  
  197.   This command is like the CLI command "Type opt h".  It displays a file as
  198.   a combination of hexadecimal numbers and the associated ASCII characters.
  199.  
  200. Info on S & D
  201.  
  202.   Nothing in the File Window need be selected.  This command displays the
  203.   number of unused bytes on the S and D devices.  You should check this
  204.   before copying to D.
  205.  
  206.   If D is blank, the report for D will be meaningless.  Note that RAM: always
  207.   reports "0 bytes free," because the ramdisk only uses as much memory as it
  208.   needs for the moment.
  209.   
  210. MakeDir named D
  211.  
  212.   MakeDir creates a single subdirectory with the name given in gadget D.
  213.   If a path name is given, the directory can be on another device or within
  214.   another directory; otherwise the new directory is added to the current
  215.   directory.  Nothing need be selected in the File Window.
  216.  
  217. Move files to D
  218.  
  219.   This command works with files, a directory, of a combination thereof.
  220.   D should contain the name of an existing directory or subdirectory on the
  221.   current device; if D is blank, selections will be moved to the root
  222.   directory.
  223.  
  224.   The selected files are not copied, they are only relocated to a different
  225.   directory on the same device.  This is like picking up icons and dropping
  226.   them into different drawers on the Workbench.
  227.  
  228. Parent dir
  229.  
  230.   This command moves you up one level in the hierarchy of directories.  If
  231.   you are in the root directory, nothing happens.
  232.  
  233. Print textfiles
  234.  
  235.   This causes text files to be printed on your printer.  Using this command
  236.   with binary (program) files is not advised.  DirUtil uses the PRT: device
  237.   to execute this command, so you may have to insert your Workbench disk to
  238.   get any results.
  239.  
  240. Rename as D
  241.  
  242.   This command renames one file or directory.  If only a name is given
  243.   in D, the renamed file stays in the same directory.  If a path name is
  244.   given as well, the file can move while it is being renamed.  But it must
  245.   remain on the same device.
  246.  
  247. Root dir
  248.  
  249.   The root is the highest directory level.  This command takes you
  250.   immediately to the root, bypassing any intermediate directory levels
  251.   (cf. Parent directory above)
  252.  
  253. Run program + R
  254.  
  255.   Run allows you to start another program from within DirUtil, as though
  256.   you had typed "RUN <programname>" from CLI.  If the R gadget contains
  257.   a string, that string is passed along to the program.  (Example:  from
  258.   CLI you might edit a file by typing "RUN ED DF1:TEXTFILE".  From DirUtil,
  259.   you could type "DF1:TEXTFILE" into gadget R, click on ED in the File
  260.   Window, and click on Run in the Command Window).
  261.  
  262.   New to 4.3:  The first paragraph describes the default situation, when
  263.   the command reads "Run file + R".  If you click the Cycle command, the
  264.   command changes to "Run R + file".  Now the Run commands means "Run the
  265.   program in the R gadget and pass it the first highlighted file as an
  266.   argument."
  267.  
  268.   New to 4.3:  If no file is highlighted, DirUtil attempts to RUN whatever
  269.   is in the R gadget.  It will search the current path for the file.  With
  270.   this option you can type almost any CLI command into the R gadget and 
  271.   execute it.  (A very handy example is to ECHO >PRT: "[setup codes]"
  272.   before using the Print Textfiles command--e.g. to turn boldface on or
  273.   off, replace [setup codes] with ESC[1m or ESC[0m.  Need I say that ESC
  274.   means press the ESC key once; don't type E-S-C?)
  275.  
  276.   These changes make Run a very versatile command and will save you a lot
  277.   of directory swapping.
  278.  
  279.   If the program produces its own screen or window, that will appear and
  280.   be used as the input/output area.  Some programs (e.g. those in the C
  281.   directory) don't make their own output windows.  If DirUtil was started
  282.   from CLI, these programs will (I hope) send their output to that CLI.  If
  283.   DirUtil was started from its icon, the output will (if we're lucky) go to
  284.   the funny little window that sits behind DirUtil.
  285.  
  286.   The program RUN in the C: directory must be present when this command is
  287.   chosen.  Run only works on the first highlighted file--otherwise you
  288.   might spawn so many new programs that you'd run out of memory.
  289.  
  290.   It's only fair to warn you that some programs flatly refuse to Run!
  291.   Two important CLI commands that don't work are PATH and CD.  As far as
  292.   DirUtil is concerned, CD is what's in the S gadget.  It ignores the CD
  293.   of the CLI window it was started from.  DirUtil's PATH is the path it
  294.   inherited from its CLI, and it can't be changed once DirUtil starts.
  295.   Worse, if DirUtil is started from the icon, its path is just Current
  296.   Directory (S gadget) -- C directory.  That's it.
  297.  
  298. Search for R
  299.  
  300.   DirUtil will search the selected file(s) for a string of up to 60
  301.   characters given in R.  The match must be exact--uppercase and lowercase
  302.   are distinguished.
  303.  
  304.   If the string contains a backslash character (\), the next two characters
  305.   are assumed to be hexadecimal digits representing a single character with
  306.   that hex value.
  307.  
  308.   If DirUtil can allocate enough memory, it performs a FAST search, which
  309.   is announced on the screen.  If it is forced into a SLOW search, you can
  310.   abort by pressing the ESC key.
  311.  
  312. Select all
  313.  
  314.   This is the converse of the Clear selections command.  It selects all the
  315.   files in the current directory, even those whose names have scrolled off
  316.   the top or bottom of the File Window.  After selecting all, you are still
  317.   free to deselect individual files by clicking on their highlighted names.
  318.  
  319. Show pictures
  320.  
  321.   For this command to work, you must have a program such as "Show" or
  322.   "Showall," one of the public domain programs that display Amiga pictures.
  323.   The program must be renamed "Show" and placed in your C: directory.
  324.  
  325.   DirUtil is "frozen" while pictures are being shown.  To escape from viewing
  326.   a series of pictures, see the procedure mentioned under "Zap files."
  327.  
  328. Swap S & D
  329.  
  330.   This exchanges the contents of the S and D gadgets and adjusts the File
  331.   Window to match.  If D is blank, the root of the current directory is
  332.   made current.  If D doesn't properly describe a directory path, DirUtil
  333.   will retreat to the previous S directory or to RAM:.
  334.   
  335. Total bytes
  336.  
  337.   Use this command to get a count of the total bytes in all selected files.
  338.   It won't work on directories.  
  339.  
  340. Type textfiles
  341.  
  342.   This command prints selected text file(s) to the screen (cf. Print files).
  343.   For non-text files use the "Hex type files" command.  Both type commands
  344.   pause after a screenful of text has been displayed; press the spacebar to
  345.   proceed to the next page.  You can't move back to a previous page.  The
  346.   return key causes line-by-line scrolling.  The ESC key ends viewing of the
  347.   current file.
  348.  
  349. UnARC a file
  350.  
  351.   For this command to work, you must have the public domain "UnARC" program
  352.   in your C: directory.  The resulting unarced files usually appear in the
  353.   same directory with the .ARC file, but sometimes they wander off to another
  354.   device...I don't know why.  Unarc only works on the first highlighted file
  355.   (this is to prevent overflowing your disk).
  356.  
  357. Zap files
  358.  
  359.   This works only on files, and does just what it says--zaps 'em!  Because
  360.   of the evident risks of this command, you must click twice to begin a
  361.   Delete.  The two clicks must be over the Delete command and within a short
  362.   period of time, just as though you were doubleclicking on an icon.
  363.  
  364.   There is a way to abort the delete command (or any DirUtil command that
  365.   works on more than one file):  move the mouse into the File Window and
  366.   click there.  If DirUtil hasn't already deleted everything, it will stop.
  367.  
  368. A few words on customizing:
  369.  
  370.   There are two things about DirUtil you might want to change:  the name of
  371.   the editor, and the list of gadgets at the top.  To do this, you must have
  372.   an editor that can handle binary files.  Commodore's ED won't do; EDIT
  373.   might work but you need to specify a longer line length than the default.
  374.   I've heard that Filezap, a PD editor, works fine.  I use a commercial
  375.   editor, TxEd, myself.
  376.  
  377.   The critical point to remember is that you must REPLACE bytes, not add or
  378.   subtract them.  Your edited version of DirUtil must be exactly as long as
  379.   the original or it won't run.
  380.  
  381.   If you intend to try this, MAKE A BACKUP COPY FIRST!!!
  382.  
  383.   Changing the editor:  search DirUtil for the string "run >nil: e".  You
  384.   should find only one occurence.  "e" will be followed by seven spaces,
  385.   so your new editor name can be up to eight characters long.  If you don't
  386.   keep your editor in the C: directory (you really should), you may have to
  387.   squeeze in a device:directory/ as well as the name.
  388.  
  389.   Changing devices:  Suppose you don't have a hard drive (I don't!) so you
  390.   don't need DH0:.  But you do have a fourth floppy drive (I don't!) called
  391.   DF3:.  Search DirUtil for the string "DH0:".  You'll find it twice--once
  392.   in capitals, once in lowercase.  The first is the gadget text, the second
  393.   is part of the command to switch devices.  Change both to DF3:, save the
  394.   file, and DF3: should appear in future.
  395.  
  396.   (Note:  the word "ram:" appears several times in DirUtil...better leave
  397.   that device alone!)
  398.  
  399. Finally, a bug report:
  400.  
  401.   The "Run program" command won't work if there are selected filename
  402.   contains spaces.  As soon as the CLI RUN command sees the space, it thinks
  403.   the filename is finished.  The same thing would happen if you tried to run
  404.   the program from CLI--the solution there would be to enclose the filename
  405.   in quotes.  I tried some easy fixes to this but other problems came up,
  406.   so I have elevated this from a Bug to a Feature.  Man was not meant to
  407.   embed spaces in filenames, and DirUtil punishes him if he transgresses.
  408.  
  409.